import { Injectable, ElementRef, OnInit } from '@angular/core';

@Injectable({
  providedIn: 'root',
})
export class TabHeightService implements OnInit {
  topTabHeight!: number;
  footerTabHeight!: number;
  constructor() {}
  ngOnInit(): void {}
  getTopTabHeight(el: ElementRef) {
    this.topTabHeight = el.nativeElement.clientHeight;
    console.log('topHeight', this.topTabHeight);
  }
  getFooterTabHeight(el: ElementRef) {
    const footer = el.nativeElement.getElementsByClassName('footer')[0];
    this.footerTabHeight = footer.clientHeight;
    console.log('footerTabHeight', footer.clientHeight);
  }
  public get TopTabHeight(): number {
    return this.topTabHeight;
  }
  public get FooterTabHeight(): number {
    return this.footerTabHeight;
  }
}
